package com.me.modules.scheduling.service.impl;

import com.me.modules.common.common.Constant;
import com.me.modules.common.page.Page;
import com.me.modules.common.page.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.me.modules.scheduling.dao.SchedulingInfoDao;
import com.me.modules.scheduling.entity.SchedulingInfoEntity;
import com.me.modules.scheduling.service.SchedulingInfoService;



@Service("schedulingInfoService")
public class SchedulingInfoServiceImpl implements SchedulingInfoService {
	@Autowired
	private SchedulingInfoDao schedulingInfoDao;

	@Override
	public SchedulingInfoEntity queryObject(String id){
		return schedulingInfoDao.queryObject(id);
	}

	@Override
	public List<SchedulingInfoEntity> queryList(Map<String, Object> map){
		return schedulingInfoDao.queryList(map);
	}

    @Override
    public List<SchedulingInfoEntity> queryListByBean(SchedulingInfoEntity entity) {
        return schedulingInfoDao.queryListByBean(entity);
    }

	@Override
	public int queryTotal(Map<String, Object> map){
		return schedulingInfoDao.queryTotal(map);
	}

	@Override
	public int save(SchedulingInfoEntity schedulingInfo){


		return schedulingInfoDao.save(schedulingInfo);
	}

	@Override
	public int update(SchedulingInfoEntity schedulingInfo){
        return schedulingInfoDao.update(schedulingInfo);
	}

	@Override
	public int delete(String id){
        return schedulingInfoDao.delete(id);
	}

	@Override
	public int deleteBatch(Integer[] ids){
        return schedulingInfoDao.deleteBatch(ids);
	}

	@Override
	public Page<SchedulingInfoEntity> findPage(SchedulingInfoEntity schedulingInfoEntity, int pageNum) {
		PageHelper.startPage(pageNum, Constant.pageSize);
		schedulingInfoDao.queryList(schedulingInfoEntity);
		return PageHelper.endPage();
	}

	@Override
	public List<SchedulingInfoEntity> queryCalendarList() {
		return schedulingInfoDao.queryCalendarList();
	}

}
